package com.shanjupay.merchant.controller;


import com.shanjupay.merchant.api.MerchantService;
import com.shanjupay.merchant.api.dto.MerchantDTO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("merchant")
public class MerchantConterllor {

    @Autowired
    MerchantService merchantService;


    //商户注册接口
    @PostMapping("registerMerchant")
    public MerchantDTO registerMerchant(@RequestBody MerchantDTO merchantDTO){

       return merchantService.createMerchant(merchantDTO);

    }
}
